package com.romadan.core.wolfram.gui;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;

public class CreateFile {
	public void createFile(File dir, String text) throws UnsupportedEncodingException, FileNotFoundException {
		PrintWriter writer = null;
			writer = new PrintWriter(new OutputStreamWriter(
					new FileOutputStream(dir), "windows-1251"));
			writer.write(text);
			writer.close();
	}
}
